package com.shangcheng.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shangcheng.entity.TShopCart;
import com.shangcheng.entity.TShopCartView;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TShopCarMapper extends BaseMapper<TShopCart> {
    @Select("SELECT a.*,b.name as product_name,b.pic_url,b.sale_price FROM  t_shop_cart a inner join t_product b on a.product_id = b.id where a.CUSTMER_ID = #{custmerid} order by a.id")
    public List<TShopCartView> findShopCartViews(Integer custmerid);

}
